package com.hongawen.mqtt.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessagingException;
import org.springframework.stereotype.Component;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2021年11月23日 14:58
 */
@Slf4j
@Component
public class MqttInboundMessageHandler implements MessageHandler {

    @Override
    public void handleMessage(Message<?> message) throws MessagingException {
        log.info("mqtt消息全部：{}",message);
        log.info("mqtt reply: {}", message.getPayload());
    }
}
